package com.cazor.dg.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cazor.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.cazor.dg.mapper.DgHisDataReqListMapper;
import com.cazor.dg.domain.DgHisDataReqList;
import com.cazor.dg.service.IDgHisDataReqListService;

/**
 * 历史数据上传记录Service业务层处理
 * 
 * @author cazor
 * @date 2024-01-16
 */
@Service
public class DgHisDataReqListServiceImpl extends ServiceImpl<DgHisDataReqListMapper, DgHisDataReqList> implements IDgHisDataReqListService
{
    @Resource
    private DgHisDataReqListMapper dgHisDataReqListMapper;

    /**
     * 查询历史数据上传记录
     * 
     * @param id 历史数据上传记录主键
     * @return 历史数据上传记录
     */
    @Override
    public DgHisDataReqList selectDgHisDataReqListById(Long id)
    {
        return dgHisDataReqListMapper.selectDgHisDataReqListById(id);
    }

    /**
     * 查询历史数据上传记录列表
     * 
     * @param dgHisDataReqList 历史数据上传记录
     * @return 历史数据上传记录
     */
    @Override
    public List<DgHisDataReqList> selectDgHisDataReqListList(DgHisDataReqList dgHisDataReqList)
    {
        return dgHisDataReqListMapper.selectDgHisDataReqListList(dgHisDataReqList);
    }

    /**
     * 新增历史数据上传记录
     * 
     * @param dgHisDataReqList 历史数据上传记录
     * @return 结果
     */
    @Override
    public int insertDgHisDataReqList(DgHisDataReqList dgHisDataReqList)
    {
        dgHisDataReqList.setCreateTime(DateUtils.getNowDate());
        return dgHisDataReqListMapper.insertDgHisDataReqList(dgHisDataReqList);
    }

    /**
     * 修改历史数据上传记录
     * 
     * @param dgHisDataReqList 历史数据上传记录
     * @return 结果
     */
    @Override
    public int updateDgHisDataReqList(DgHisDataReqList dgHisDataReqList)
    {
        dgHisDataReqList.setUpdateTime(DateUtils.getNowDate());
        return dgHisDataReqListMapper.updateDgHisDataReqList(dgHisDataReqList);
    }

    /**
     * 批量删除历史数据上传记录
     * 
     * @param ids 需要删除的历史数据上传记录主键
     * @return 结果
     */
    @Override
    public int deleteDgHisDataReqListByIds(Long[] ids)
    {
        return dgHisDataReqListMapper.deleteDgHisDataReqListByIds(ids);
    }

    /**
     * 删除历史数据上传记录信息
     * 
     * @param id 历史数据上传记录主键
     * @return 结果
     */
    @Override
    public int deleteDgHisDataReqListById(Long id)
    {
        return dgHisDataReqListMapper.deleteDgHisDataReqListById(id);
    }
}
